package com.example.communist_app_api.service.impl;

import com.example.communist_app_api.db.dao.ModuleDao;
import com.example.communist_app_api.db.pojoDto.Module;
import com.example.communist_app_api.service.ModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author love~mlm
 * @version 1.0
 * Create by 2022/11/19 19:54
 */
@Transactional
@Service
public class ModuleServiceImpl implements ModuleService {

    @Autowired
    private ModuleDao moduleDao;
    @Override
    public String getModuleCodeByModuleId(Integer moduleId) {
        return moduleDao.getModuleCodeByModuleId(moduleId);
    }

    public Module getModuleByModuleName(String moduleCode) {
        return moduleDao.getModuleByModuleName(moduleCode);
    }
}
